<?php
class SystemAction extends CommonAction {
	public function index() {
		$Config = M('Config');
		if ($_POST){
			foreach ($_POST as $key => $value) {
				$Config->where('config_name = "'.$key.'"')->data(array('config_value'=>$value))->save();
			}
		}
		$this->assign('configs',$Config->getField('config_name,config_value'));
		$this->display();
	}
}